import os

# 项目根目录名
project_name = "interface_test_demo"

# 要创建的文件夹
folders = ["api", "script", "data", "report", "common"]

# 要创建的 .py 文件
files = ["config.py", "run_suite.py"]

# 创建项目目录
if not os.path.exists(project_name):
    os.mkdir(project_name)

# 进入项目目录
for folder in folders:
    os.makedirs(os.path.join(project_name, folder), exist_ok=True)

# 创建 .py 文件
for file in files:
    file_path = os.path.join(project_name, file)
    with open(file_path, 'w', encoding='utf-8') as f:
        f.write("# " + file)  # 初始写入一个注释

print("✅ 项目结构创建完成！请在 PyCharm 中刷新查看。")
